import org.zh.entity.ServiceEntity;

import java.net.http.HttpResponse;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

import static org.zh.util.CommonStatic.smartHttpPOSTJSON;

public class test {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ServiceEntity serviceEntity = new ServiceEntity();
        serviceEntity.setApplicationName("order");
        serviceEntity.setApplicationBaseUrl("http://172.22.192.1:9000/order");
        serviceEntity.getSubClass().add("org.zh.svs.pro.remote.ProRemote");
        CompletableFuture<HttpResponse<String>> future = smartHttpPOSTJSON("http://localhost:8848/rc/zhOpen/registry", serviceEntity);
        HttpResponse<String> response = future.get();
        System.out.println(response.body());
    }
}
